<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>for...in 遍历对象的属性</title>
</head>
<body>
    <script>
        var books={};
        var books={
            bookname1: '《JavaScript前端开发案例教程》',
            bookname2: '《Node.js核心基础教程》',
            bookname3: '《HTML5移动Web开发》',
        }
        for(const key in books) {
            document.write(books[key]+'</br>');
        }
    </script>
</body>
</html>